Skip to content

send_request should not update _default_headers#439

Open
tanoda wants to merge 1 commit intookta:masterfrom
tanoda:patch-1
Open

send_request should not update _default_headers#439
tanoda wants to merge 1 commit intookta:masterfrom
tanoda:patch-1

Conversation

@tanoda
Copy link

@tanoda tanoda commented Mar 18, 2025

HTTPClient.send_request updates its _default_headers with headers from its parameter.
I don't believe this is the thing that you want.

@tanoda
Copy link
Author

tanoda commented Mar 18, 2025

In addition, _default_headers shares its dict instance with the RequestExecutor.

self._default_headers = http_config["headers"]

'headers': self._default_headers,

So RequestExecutor.create_request also adds the latest headers.

headers = {**self._default_headers, **headers}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant